Attribute VB_Name = "Module1"
Global cnn As New ADODB.Connection
Global rs As New ADODB.Recordset
'Global rstimkiem As New ADODB.Recordset
Public Sub ketnoi()
Dim strketnoi As New ADODB.Connection
If cnn.State = adStateOpen Then
   cnn.Close
End If
cnn.ConnectionString = "Provider=Microsoft.jet.oledb.4.0;" _
& "data source=" & App.Path & "\QLHS2.mdb"
cnn.CursorLocation = adUseClient

cnn.Open
End Sub
Public Sub khoitaors()
Dim strrs As String
strrs = "select * from HOCSINH"
rs.CursorLocation = adUseClient
rs.CursorType = adOpenDynamic
rs.LockType = adLockOptimistic
If rs.State = adStateOpen Then
   rs.Close
End If
rs.Open strrs, cnn
End Sub

